#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string.h>
using namespace std;

#define Length 20

void left_reverse(char* p, int k)
{

	char new_p[Length] = { 0 };
	int len = strlen(p);
	strcpy(new_p, p + k);

	int count = len - k;
	for (int i = 0; i < k; i++)
	{
		new_p[count++] = p[i];
	}
	new_p[count] = '\0';
	strcpy(p, new_p);

}

void right_reverse(char* p, int k)
{

	char new_p[Length] = { 0 };
	int len = strlen(p);

	int count = len - k;
	for (int i = 0; i < k; i++)
	{
		new_p[i] = p[count++];
	}

	p[len - k] = '\0';
	strcpy(new_p + k, p);
	strcpy(p, new_p);

}

int main()
{

	char str[Length] = { "AABCD" };
	//scanf("%s", str);

	int num_reverse = 0;
	scanf("%d", &num_reverse);

	//left_reverse(str,num_reverse);
	right_reverse(str, num_reverse);
	printf("%d", strcmp(str, "DAABC"));

	return 0;
}
